package Expe5;

/**
 * @Author sy
 * @Date 2022/9/20
 */
public class Expe5T7 {
    public static void main(String[] args) {
        Trapezoid t1 = new Trapezoid();
        t1.up = 4.5;
        t1.down = 33.1;
        t1.height = 12.4;
        System.out.println("该梯形的面积为："+t1.getArea());
    }
}
class Trapezoid{
    double up;
    double down;
    double height;
    double getArea(){
        double Area = ((up + down)*height)/2;
        return Area;
    }
}
